package digui;

public class basic1342 {

    public int numberOfSteps(int num) {
           return findSteps(num);
    }
    public    int stepNum=0;

    public  int   findSteps(int num){
        if (num==0){
            return  stepNum;
        }
        if (num%2==0){
            stepNum++;
      return      findSteps(num/=2) ;
        }
        num-=1;
        stepNum++;
        return   findSteps(num);
    }

    public static void main(String[] args) {
        basic1342 basic1342 = new basic1342();
        System.out.println(basic1342.numberOfSteps(123));


    }
}
